#include "sdkGlobal.h"
#include "platform_global.h"


typedef struct
{
    BuildHttpHeadInfoFunc mBuildHttpHeadInfoFunc;
    TransmitListener mTransmitListener;
} platform_http_entity;

static platform_http_entity g_platform_http_entity;

void platform_http_init()
{
    memset(&g_platform_http_entity, 0x00, sizeof(platform_http_entity));
}

void platform_http_set_build_head_info_func(BuildHttpHeadInfoFunc func)
{
    g_platform_http_entity.mBuildHttpHeadInfoFunc = func;
}

BuildHttpHeadInfoFunc platform_http_get_build_head_info_func()
{
    return g_platform_http_entity.mBuildHttpHeadInfoFunc;
}

void platform_http_set_transmit_listener(TransmitListener *listener)
{
    memcpy(&g_platform_http_entity.mTransmitListener, listener, sizeof(TransmitListener));
}

TransmitListener *platform_http_get_transmit_listener(void)
{
    return &g_platform_http_entity.mTransmitListener;
}
